package dy.spec.edu.week13_home02;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import org.json.JSONException;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

public class SecondActivity extends AppCompatActivity {
    private TextView secondTxt;
    private NetImageView image;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_second);
        Intent intent=getIntent();
        Bundle bundle=intent.getExtras();
        String str=bundle.getString("title");
        secondTxt=(TextView)findViewById(R.id.s1);
        secondTxt.setText(str);
        String str2=bundle.getString("content");
        secondTxt=(TextView)findViewById(R.id.s3);
        secondTxt.setText(str2);
        String str3=bundle.getString("date");
        secondTxt=(TextView)findViewById(R.id.s4);
        secondTxt.setText(str3);
        String str4 =bundle.getString("preview");
        image=(NetImageView)findViewById(R.id.s2);
        image.setImageURL("http://www.yyjsx.xyz" + str4);

    }
}
